<layout name="layout" />
<link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">


            <div class="modal-header">
                <h4 class="modal-title">添加课程</h4>
            </div>
            <div class="modal-body">
                <form action="__SELF__" id="addClassForm" class="form-horizontal" method="post" accept-charset="utf-8">			<input type="text" class="form-control" name="comid" style="display:none" value="819188">
                    <input type="text" class="form-control" name="date" style="display:none" value="2017-05-07">
                    <input type="text" class="form-control" name="wait_class_id" id="wait_class_id" style="display:none">

                    <div class="form-group">
                        <label  class="col-lg-2 control-label">选择课程</label>
                        <div class="col-lg-6">
                            <?php buildSelect('course','course_id','id','course_name'); ?>
                        </div>
                    </div>

                    <div class="form-group">
                        <label  class="col-lg-2 control-label">选择等级</label>
                        <div class="col-lg-6">
                            <select class="form-control input-sm" name="level_id">
                                <option></option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label  class="col-lg-2 control-label">选择老师</label>
                        <div class="col-lg-6">
                            <?php buildSelect('teacher','teacher_id','id','teacher_name'); ?>
                        </div>
                        <div class="col-lg-4">
                            是否代课
                            <select class="input-sm" name="is_daike">
                                <option value="0">否</option>
                                <option value="1">是</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label  class="col-lg-2 control-label">选择教室</label>
                        <div class="col-lg-6">
                            <?php buildSelect('classroom','classroom_id','id','classroom_name'); ?>
                        </div>
                    </div>

                    <div class="form-group">
                        <label  class="col-lg-2 control-label ">选择日期</label>
                        <div class="col-lg-6">
                            <input type="text" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="form-control" name="course_date" id="adddate" value="">
                        </div>
                    </div>

                    <div class="form-group">
                        <label  class="col-lg-2 control-label">选择时间</label>
                        <div class="col-lg-6">
                            <input type="text" onclick="layui.laydate({elem: this, istime: true, format: ' hh:mm:ss'})" class="form-control input-sm necessery" name="course_time" id="add_class_begin_time">
                        </div>
                        <div class="col-lg-4 " style="text-align:left;padding-left:3px;">
                            <h6>课程开始时间，格式如"13:30"</h6>
                        </div>
                    </div>

                    <div class="form-group">
                        <label  class="col-lg-2 control-label">最大人数</label>
                        <div class="col-lg-6">
                            <input type="text" class="form-control input-sm necessery" name="limit_num" id="max" placeholder="人数必填，请输入正整数">
                        </div>
                        <div class="col-lg-4 " style="text-align:left;padding-left:3px;">
                            <h6>将决定有多少席位能被预约</h6>
                        </div>
                    </div>

                    <div class="form-group">
                        <label  class="col-lg-2 control-label">次卡扣除</label>
                        <div class="col-lg-6">
                            <input type="text" class="form-control input-sm necessery" name="card_delete" id="defaultDelTimes" value="1">
                        </div>
                        <div class="col-lg-4" style="text-align:left;padding-left:3px;">
                            <h6>次，支持小数。</h6>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-lg-2 control-label">课程颜色</label>
                        <div class="col-lg-6">
                            <input class="form-control input-sm" name="color" id="color" style="color: rgb(0, 0, 0);">
                        </div>
                    </div>

                    <div class="form-group">
                        <label  class="col-lg-2 control-label">展示/预约</label>
                        <div class="col-lg-6">
                            <select class="form-control input-sm necessery" name="is_show" id="openToBook">
                                <option value="1">在微官网展示并接受预约</option>
                                <option value="2">在微官网展示，但不接受预约</option>
                                <option value="3">不在微官网展示</option>
                            </select>
                        </div>
                    </div>

                </form></div>
            <div class="modal-footer">
                <button type="submit" id="add" class="btn btn-primary btn-sm">保存</button>
            </div>

<style>
    .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
    .ui-timepicker-div dl { text-align: left; }
    .ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
    .ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
    .ui-timepicker-div td { font-size: 90%; }
    .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
</style>

<script type="text/javascript" src="__PUBLIC__/Admin/css/layui.css"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/layui.js"></script>
<script type="text/javascript" src="__PUBLIC__/ColorPicker/jquery.js"></script>
<script type="text/javascript" src="__PUBLIC__/ColorPicker/jquery.colorpicker.js"></script>


<script type="text/javascript">
    $(document).ready(function() {



        $("#color").colorpicker({

            fillcolor:true

        });

    });

    layui.use('laydate', function(){
        var laydate = layui.laydate;
    });
    $("#add").click(function () {
        document.getElementById("addClassForm").submit();
    });
</script>

